import request from '@/utils/request'
import store from '@/store'

// 登录
export function sysLogin(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data
  })
}
// 获取用户信息
export function sysProfile() {
  return request({
    url: '/sys/profile',
    method: 'post',
    Headers: {
      Authorization: `Bearer ${store.state.user.token}`
    }
  })
}
// 获取用户头像等其他信息
export function sysUser(id) {
  return request({
    url: `/sys/user/${id}`
  })
}
